FROM wanggmail/antrpc_ubuntu_jdk:8

ENV ES_HOSTS=""
ENV ES_USERNAME=""
ENV ES_PASSWORD=""
ENV JAVA_OPTS="-XX:+ExitOnOutOfMemoryError"

USER root
WORKDIR /root

RUN bash -c ' \
    set -euxo pipefail && \
    apt-get update && \
    apt-get install -y curl && \
    apt-get clean'

ADD entrypoint.sh entrypoint.sh
ADD *.jar app.jar
RUN chmod 755 entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]
EXPOSE 9797

